﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using Newtonsoft.Json;
using FreeSql.DataAnnotations;

namespace VueShopApi.Entities 
{
	/// <summary>
	/// 商品表
	/// </summary>
	[JsonObject(MemberSerialization.OptIn), Table(Name = "sp_goods", DisableSyncStructure = true)]
	public partial class SpGoods 
	{
		/// <summary>
		/// 主键id
		/// </summary>
		[JsonProperty("goods_id"), Column(Name = "goods_id", DbType = "mediumint(8) unsigned", IsPrimary = true, IsIdentity = true)]
		public int GoodsId { get; set; }

		/// <summary>
		/// 添加商品时间
		/// </summary>
		[JsonProperty("add_time"), Column(Name = "add_time")]
		public int AddTime { get; set; }

		/// <summary>
		/// 类型id
		/// </summary>
		[JsonProperty("cat_id"), Column(Name = "cat_id")]
		public int CatId { get; set; } = 0;

		/// <summary>
		/// 一级分类id
		/// </summary>
		[JsonProperty("cat_one_id"), Column(Name = "cat_one_id", DbType = "smallint(5)")]
		public int? CatOneId { get; set; } = 0;

		/// <summary>
		/// 三级分类id
		/// </summary>
		[JsonProperty("cat_three_id"), Column(Name = "cat_three_id", DbType = "smallint(5)")]
		public int? CatThreeId { get; set; } = 0;

		/// <summary>
		/// 二级分类id
		/// </summary>
		[JsonProperty("cat_two_id"), Column(Name = "cat_two_id", DbType = "smallint(5)")]
		public int? CatTwoId { get; set; } = 0;

		/// <summary>
		/// 软删除标志字段
		/// </summary>
		[JsonProperty("delete_time"), Column(Name = "delete_time")]
		public int? DeleteTime { get; set; }

		/// <summary>
		/// 图片logo大图
		/// </summary>
		[JsonProperty("goods_big_logo"), Column(Name = "goods_big_logo", DbType = "char(128)", IsNullable = false)]
		public string GoodsBigLogo { get; set; }

		/// <summary>
		/// 商品详情介绍
		/// </summary>
		[JsonProperty("goods_introduce"), Column(Name = "goods_introduce", StringLength = -1)]
		public string GoodsIntroduce { get; set; }

		/// <summary>
		/// 商品名称
		/// </summary>
		[JsonProperty("goods_name"), Column(Name = "goods_name", IsNullable = false)]
		public string GoodsName { get; set; }

		/// <summary>
		/// 商品数量
		/// </summary>
		[JsonProperty("goods_number"), Column(Name = "goods_number", DbType = "int(8) unsigned")]
		public int GoodsNumber { get; set; } = 0;

		/// <summary>
		/// 商品价格
		/// </summary>
		[JsonProperty("goods_price"), Column(Name = "goods_price")]
		public decimal GoodsPrice { get; set; } = 0.00M;

		/// <summary>
		/// 图片logo小图
		/// </summary>
		[JsonProperty("goods_small_logo"), Column(Name = "goods_small_logo", DbType = "char(128)", IsNullable = false)]
		public string GoodsSmallLogo { get; set; }

		/// <summary>
		/// 商品状态 0: 未通过 1: 审核中 2: 已审核
		/// </summary>
		[JsonProperty("goods_state"), Column(Name = "goods_state")]
		public int? GoodsState { get; set; } = 0;

		/// <summary>
		/// 商品重量
		/// </summary>
		[JsonProperty("goods_weight"), Column(Name = "goods_weight")]
		public int GoodsWeight { get; set; } = 0;

		/// <summary>
		/// 热卖数量
		/// </summary>
		[JsonProperty("hot_mumber"), Column(Name = "hot_mumber", DbType = "int(11) unsigned")]
		public int? HotMumber { get; set; } = 0;

		/// <summary>
		/// 0:正常  1:删除
		/// </summary>
		[JsonProperty("is_del"), Column(Name = "is_del", InsertValueSql = "'0'")]
		public SpGoodsISDEL IsDel { get; set; }

		/// <summary>
		/// 是否促销
		/// </summary>
		[JsonProperty("is_promote"), Column(Name = "is_promote", DbType = "smallint(5)")]
		public int? IsPromote { get; set; } = 0;

		/// <summary>
		/// 修改商品时间
		/// </summary>
		[JsonProperty("upd_time"), Column(Name = "upd_time")]
		public int UpdTime { get; set; }

	}

	public enum SpGoodsISDEL {
		/// <summary>
/// 0
/// </summary>
[Description("0")]
Unknow1 = 1, 
/// <summary>
/// 1
/// </summary>
[Description("1")]
Unknow2
	}
}
